package com.dong.flink;

import com.esotericsoftware.kryo.NotNull;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.ThreadFactory;
@Slf4j
public class AppMain {

    public static void main(String[] args) throws InterruptedException {

        System.out.println("<应用启动>");

        ThreadFactory threadFactory = new ThreadFactory() {
            @Override
            public Thread newThread( Runnable  r) {
                Thread t = new Thread(r);
                t.setName("mythread");
                return  t;
            }
        };


        threadFactory.newThread(new Runnable() {
            @Override
            public void run() {
                WordCountDemo.count();
            }
        }).start();


        WordCountDemo.nettyTest();
        while (true) {
            Thread.sleep(1000);
            System.out.println("。。。。。。。。。");
        }
    }

}
